package com.flitsneak.designpatterns.creationalpatterns.builder;

import com.flitsneak.designpatterns.creationalpatterns.builder.Models.ExcitedModel;
import com.flitsneak.designpatterns.creationalpatterns.builder.Models.MovingModel;
import com.flitsneak.designpatterns.creationalpatterns.builder.builders.ExcitedSceneBuilder;
import com.flitsneak.designpatterns.creationalpatterns.builder.builders.MovingSceneBuilder;

import java.util.ArrayList;

/**
 * Author: flitsneak
 * Date: 2022/6/6 11:34
 * Description:
 */
public class Director {
    private ArrayList<String> sequence = new ArrayList<>(6);

    private ExcitedSceneBuilder excitedSceneBuilder = new ExcitedSceneBuilder();

    private MovingSceneBuilder movingSceneBuilder = new MovingSceneBuilder();

    public MovingModel getPlanAMovingModel() {
        this.sequence.clear();
        this.sequence.add("flower");
        this.sequence.add("red candle");
        this.sequence.add("red wine");

        this.movingSceneBuilder.setSequence(this.sequence);
        return (MovingModel)this.movingSceneBuilder.getRomanticModel();
    }

    public ExcitedModel getPlanCExcitedModel() {
        this.sequence.clear();
        this.sequence.add("red candle");
        this.sequence.add("red wine");
        this.sequence.add("flower");

        this.excitedSceneBuilder.setSequence(this.sequence);
        return (ExcitedModel)this.excitedSceneBuilder.getRomanticModel();
    }
}
